/*
 * Copyright 2016 Wealth Inc. All rights reserved.
 */
 package com.wealth.order.service;

import java.util.Date;
import java.util.List;

import org.springframework.data.domain.Page;

import com.wealth.order.entity.Order;
import com.wealth.order.vo.OrderVOCenter;

import iaas.service.IBaseService;
import iaas.utils.ResultObject;
import iaas.web.JqGridRequest;

/**
 * @author chan
 * @version 1.0
 * @since 1.0
 */
 
public interface IOrderService extends IBaseService<Order>{
	
	/** 分页查询   商户订单  */
	public Page<Order> getOrder(Long merchantid, JqGridRequest request,Class<Order> clz) throws Exception;
	
	/** 查询  银行订单下商户订单 */
	public List<Order> findByOrderPlatId(Long orderPlatId);
	
	/** ---------------- 微信端 ---------------- */
	/** 保存商户订单 */
	public ResultObject saveOrder(Order order) throws Exception;
	
	/** 支付商户订单 */
	public void payOrder(Order order) throws Exception;
	
	/** 加载商户订单 未付款 1/未发货 2/未签收 3/未评论 7 */
	public List<OrderVOCenter> ajaxOrder(Long memberid, Integer status, Integer index,Integer offset) throws Exception;
	/** 加载商户订单 未付款 1/未发货 2/未签收 3/未评论 7 */
	public ResultObject ajaxOrderPage(Long memberid, Integer status,Integer pageNumber,Integer pageSize) throws Exception;
	
	/** 商户月消费人数 */
	public Integer avgConsumeNumberByMerchantId(Long merchantid,Date start,Date end) throws Exception;
	
	/** 商户平均消费 */
	public Integer avgTotalByMerchantId(Long merchantid) throws Exception;
	
	/** 加载商户消费记录 未付款 1/未发货 2/未签收 3/未评论 7 */
	public List<OrderVOCenter> ajaxConsumption(Long memberid, Integer status, Integer index,Integer offset) throws Exception;
	/** 加载商户消费记录 未付款 1/未发货 2/未签收 3/未评论 7 */
	public ResultObject ajaxConsumptionPage(Long memberid, Integer status, Integer pageNumber,Integer pageSize) throws Exception;
	
	/** 发货商户订单 */
	public void send(Order order) throws Exception;
	
	/** 签收商户订单 */
	public ResultObject sign(Order order) throws Exception;
	
	/** 统计订单数 未付款 1/未发货 2/未签收 3/未评论 7 */
	public Integer countOrder(Long memberid, Integer status) throws Exception;
	
	/** 统计订单数 已付款  */
	public Integer countPayStatusOrder(Long memberid)  throws Exception;
	
	
}
